/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    hansen
 * 创建时间:    2023-10-25
 */
package org.jeecg.modules.dock.entity.mes.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.jeecg.modules.utils.DockContentUtil;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * MES-WMS发送生产入库（超大卷）
 *
 * @author hansen
 * @version 1.0.0
 * @date 2023-10-25 09:15:27
 */
@ApiModel(value = "MES-WMS发送生产入库（超大卷）", description = "MES-WMS发送生产入库（超大卷）")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SCStockSuperRequestVO extends MesBaseRequestVO {
    @ApiModelProperty("生产订单号")
    private String orderCode;

    @NotNull
    @ApiModelProperty("明细")
    private List<Detail> detail;

    @Data
    public static class Detail implements Serializable {

        @NotBlank
        @ApiModelProperty("批次号")
        private String batchId;

        @ApiModelProperty("物料编号")
        private String materialCode;

        @NotNull
        @ApiModelProperty("净重KG")
        private Integer netWeight;

        @NotNull
        @ApiModelProperty("毛重KG")
        private Integer grossWeight;

        @NotNull
        @ApiModelProperty("数量（卷）")
        private BigDecimal number;

        @ApiModelProperty("客户代码")
        private String customCode;

        @ApiModelProperty("投产批次号")
        private String inPutBatch;
        @ApiModelProperty("投产批次物料编码")
        private String parentBatch;
        @ApiModelProperty("原卷重量")
        private BigDecimal quantity;

        public void setMaterialCode(String materialCode) {
            this.materialCode = DockContentUtil.addZero(materialCode);
        }
    }
}
